package cn.chair.model;

import life.innovation.model.BaseModel;

import java.io.Serializable;

public class Result extends BaseModel implements Serializable {
    
    private static final long serialVersionUID = -2618629500143823402L;

    public static final int SUCCESS = 1;
    public static final int FAIl = 2;
    public static final int ERROR_INSUFFICIENT_FUND = 2;
    public static final int ERROR_CODE_MISSING_PARAM = 11;
    public static final int ERROR_CODE_INVALID_HASH = 2;
    public static final int ERROR_OTHER = 100;

    public static final int RETURN_CODE_SUCCESS = 1;
    public static final String RETURN_MSG_SUCCESS = "SUCCESS";

    public static final String MSG_MISSING_PARAM = "没有请求参数";
    public static final String ERROR_MSG_INVALID_HASH = "身份验证失败";
    public static final String MSG_ERROR_OTHER = "其他";

    public static final int RETURN_CODE_MISSING_ORDER = 13;
    public static final String RETURN_MSG_MISSING_ORDER = "查无此订单";

    public static final int RETURN_CODE_REVERSE_FAILED = 18;
    public static final String RETURN_MSG_REVERSE_FAILED = "退款失败";

    public static final int RETURN_CODE_EXCEED_ORDER_AMOUNT = 19;
    public static final String RETURN_MSG_EXCEED_ORDER_AMOUNT = "退单金额超出订单金额";
    public static final String MEMBER_MSG_EXCEED_ORDER_AMOUNT = "会员卡余额不足";
    public static final String MEMBER_MSG_EXCEED_IS_NOT = "会员卡不存在";

    public static final int RETURN_CODE_ALREADY_BEEN_REVERSED =20;
    public static final String RETURN_MSG_ALREADY_BEEN_REVERSED = "订单已退款";

    public static final int RETURN_CODE_REVERSE_NOT_SUPPORT = 22;
    public static final String RETURN_MSG_REVERSE_FAILED_NOT_SUPPORT = "不支持退款";

    public static final int RETURN_CODE_PAYMENT_IN_PROCESS = 25;
    public static final String RETURN_MSG_PAYMENT_IN_PROCESS = "正在处理";

    private int resultCode;
	private String errorMsg;
    private String extra;

	public Result() {
		this.resultCode = SUCCESS;
	}

	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMessage(String errorMsg) {
		this.errorMsg = errorMsg;
	}

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }
}
